home *** CD-ROM | disk | FTP | other *** search
-
-
-
- UUUUSSSSVVVVSSSSEEEEMMMMAAAA((((3333PPPP)))) UUUUSSSSVVVVSSSSEEEEMMMMAAAA((((3333PPPP))))
-
-
-
- NNNNAAAAMMMMEEEE
- usvsema - release a semaphore
-
- CCCC SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- ####iiiinnnncccclllluuuuddddeeee <<<<uuuulllloooocccckkkkssss....hhhh>>>>
-
- iiiinnnntttt uuuussssvvvvsssseeeemmmmaaaa ((((uuuusssseeeemmmmaaaa____tttt ****sssseeeemmmmaaaa))));;;;
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- _u_s_v_s_e_m_a increments the count associated with _s_e_m_a. If there are any
- processes queued waiting for the semaphore the first one is awakened.
- _u_s_v_s_e_m_a uses the _u_s_e_m_a(7M) device to reactivate a suspended process. If
- the process to be awoken is no longer alive, _u_s_v_s_e_m_a will automatically
- attempt to awaken the next process waiting for the semaphore.
-
- In order to use a semaphore, the caller must have joined the shared arena
- out of which the semaphore is allocated (via _u_s_i_n_i_t(3P)), and have a file
- descriptor to a _u_s_e_m_a device to unsuspend any waiting processes. As a
- convenience, _u_s_v_s_e_m_a will automatically do this for members of a share
- group, or for related (via _f_o_r_k(2)) processes. This automatic facility
- can generate the same errors as _u_s_i_n_i_t(3P), and _u_s_o_p_e_n_p_o_l_l_s_e_m_a(3P).
- These errors will be passed back to the caller. If tracing is enabled
- (see _u_s_i_n_i_t(_3_P)) then any errors will cause a message to be printed to
- _s_t_d_e_r_r. To avoid these errors and therefore not need to check for errors
- on every _u_v_p_s_e_m_a call, have each process call _u_s_i_n_i_t(_3_P) and each user of
- a pollable semaphore call _u_s_o_p_e_n_p_o_l_l_s_e_m_a(3P).
-
- The following error can always occur:
-
- [EBADF] The underlying file descriptor for the semaphore was
- closed or re-used by the application.
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- uscpsema(3P), usinit(3P), usinitsema(3P), usnewsema(3P),
- usnewpollsema(3P), usopenpollsema(3P), uspsema(3P), ustestsema(3P),
- usema(7M).
-
- DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
- Upon successful completion the semaphore has been released and a value of
- 0 is returned. On error, -1 is returned and _e_r_r_n_o is set to indicate the
- error.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-